.global atomic_set
atomic_set:
    mov x4, 1
    lsl x0, x4, x0
1:
    ldxr x2, [x1]
    orr x2, x2, x0
    stxr w3, x2, [x1]
    cbnz w3, 1b
    ret
